package com.simple.gateway.center.domian.application.repository;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.simple.gateway.center.domian.application.bo.ApplicationInterfaceBO;
import com.simple.gateway.center.domian.application.bo.ApplicationInterfaceMethodBO;
import com.simple.gateway.center.domian.application.bo.ApplicationSystemBO;
import com.simple.gateway.center.web.param.ApplicationCompositeParam;

import java.util.List;

/**
 * 项目: simple-gateway-core
 *
 * 功能描述:
 *
 * @author: WuChengXing
 *
 * @create: 2023-08-07 17:21
 **/
public interface IApplicationManageRepository {

    /**
     * 注册应用
     * @param applicationSystemBO
     */
    void registerApplication(ApplicationSystemBO applicationSystemBO);

    /**
     * 注册接口
     * @param applicationInterfaceBO
     */
    void registerApplicationInterface(ApplicationInterfaceBO applicationInterfaceBO);

    /**
     * 注册接口方法
     * @param applicationInterfaceMethodBO
     */
    void registerApplicationInterfaceMethod(ApplicationInterfaceMethodBO applicationInterfaceMethodBO);

    /**
     * 查询所有的应用的信息
     * @param systemIdList
     * @return
     */
    List<ApplicationSystemBO> queryApplicationSystemList(List<String> systemIdList);

    /**
     * 查询所有接口信息
     * @param systemId
     * @return
     */
    List<ApplicationInterfaceBO> queryApplicationInterfaceList(String systemId);

    /**
     * 查询所有的方法信息
     * @param systemId
     * @param interfaceId
     * @return
     */
    List<ApplicationInterfaceMethodBO> queryApplicationInterfaceMethodList(String systemId, String interfaceId);

    /**
     * 查询所有的方法信息
     * @param systemId
     * @param interfaceId
     * @param ids
     * @return
     */
    List<ApplicationInterfaceMethodBO> queryApplicationInterfaceMethodList(String systemId, String interfaceId, List<Long> ids);

    /**
     * 查询系统信息
     * @param param
     * @return
     */
    Page<ApplicationSystemBO> pageApplicationSystem(ApplicationCompositeParam param);

    /**
     * 查询系统接口信息
     * @param param
     * @return
     */
    Page<ApplicationInterfaceBO> pageApplicationInterface(ApplicationCompositeParam param);

    /**
     * 查询系统方法信息
     * @param param
     * @return
     */
    Page<ApplicationInterfaceMethodBO> pageApplicationMethod(ApplicationCompositeParam param);
}
